const mysql = require('mysql')

function sqlHelper(sql, callback) {
    const conn = mysql.createConnection({
        host: "localhost",
        user: "root",
        password: "123456",
        database: 'sy126'
    })
    conn.connect()

    conn.query(sql, callback)
    conn.end()
}
module.exports = sqlHelper